Notes Creation Process
Purpose The Notes Maintenance screen allows a user to enter a new Note or edit an existing note. This document will focus on the former Note Creation. Once the note is created an invoice will be automatically created for the entire Note Amount. An EFT record for the Note Number will also be created based upon the current entity's Royalty Balance Type information. Process The user must first decide what Entity the Note is for this can be Corporation, Developer Contract, Person or Store. If a note is being created for a Store it must have an EFT account setup prior to creating the note unless the Loan Type is 'Minority'. If one is not setup the user will see a popup notification once they attempt to choose a Loan Type other than 'Minority'. Once that user has filled out the form and hit the Save button the Notes Creation process does the following: # If this is a new Note than create a new Note object and assign it to the Note Selector Control # Assign all the values from the form to the Note object ## For the Entity Type and Entity Id, determine the Entity Type and take the values from the correct corresponding control. # For a new Note assign the properties of the sub objects for Document Tracking, Account Balance and Invoice Unposted ## The Account Balance Object is assigned a zero balance ## The Invoice Unposted object is an Invoice with one Item of type Note Distribution and the original total note amount in the defined currency. If the currency chosen is different then the country currency or the Agreed to Exchange Rate is entered then the USDToLocalConversionRate and ItemAmtToUSDConversionRate are filled in to do the local currency conversion later on in posting. # The Note Lenders sub object is re-assigned for new and existing Notes # Validation against the newly created Note is checked. If the Note object is not valid set the broken rules visuals and stop the save process. # Then check if an EFT record for Royalty balance exist if the Entity is a Store unless the Loan Type is 'Minority' or the Store has a waiver for PA Account - Per Agreement or PA Account - No Availability, if it does not, display a message box to the user stating 'EFT information must be set up for this note' and stop the save process. # Next Check that at least one Notes Receivable Lender has been chosen if not set the broken rules visuals and stop the save process. # If all the previous validations are valid save the Note Object to the database. ## First the Note will be inserted into the NRMasterfile table ## Then the Note Lenders collection will be saved ## Then save the EFT object ## If this is a new Note save the Document Tracking Object and the Account Balance Object ## Create a invoice in the Unposted tables ## Create a Note Delinquency Object ## Finally the unposted invoice is posted and the invoice Session Register is created in the file system and sent in an email. # Reset the Object Cache with the new Note Number and refresh the form making it read only. Form Validations # Loan Type is required ## If Loan Type is 'DA Other' or 'Franchisee Other' then a Comment is required # Note Amount must be greater than 0 # Term must be greater than 0, the default is 60. This can be months or Weeks depending upon the Payment Frequency. # Start Date is required. The default is today. # Payment Date is required # If Interest Calculation is Daily then Days in Year must be between 1 and 366 # Adjustment Code is required ## If Adjustment Code is 'Interest Only' then Interest Rate must be greater or equal to 0.01 ## If Adjustment Code is 'Fixed' or 'Interest Plus' then Adjustment Amount can not be greater than 100,000 Stored Procedure The Notes Maintenance form uses the following procedures